import Header from './common/header';
import { Provider } from 'react-redux';
import store from './store';
import { BrowserRouter, Route } from 'react-router-dom';
import { Globalstyle } from './style.js';
import { GlobalIconfont } from './statics/iconfont/iconfont';
import Login from './pages/login';
import Home from './pages/home';
import Detail from './pages/detail/loadable';
import Write from './pages/write';

function App() {
  return (
    <Provider store={store}>
			<Globalstyle />
			<GlobalIconfont />
			<BrowserRouter>
				<Header />
				<Route path="/" exact component={ Home }></Route>
				<Route path="/login" exact component = { Login }></Route>
				<Route path="/detail/:id" exact component = { Detail }></Route>
				<Route path="/write" exact component = { Write }></Route>
			</BrowserRouter>
    </Provider>
  );
}

export default App;
